home *** CD-ROM | disk | FTP | other *** search
- /* Get.daftp */
- /* get file <file> from site <site> of your hotlist, and put it in
- * directory <dir> on your machine
- * By Osma Ahvenlampi
- */
-
- parse arg file site dir ascii
-
- if file = "" then
- exit 10
-
- if ~show('P','daftp') then do
- address command 'Run >NIL: DaFTP'
- address command 'WaitForPort daftp >NIL:'
- if RC ~= 0 then
- exit 20
- end
-
- if ascii ~= "" then
- mode = "ASCII"
- else
- mode = "BIN"
-
- address 'daftp'
-
- if site ~= "" then
- 'site' site
-
- if dir ~= "" then
- 'setattr localdir' dir
-
- 'connect noscan'
- 'get' mode 'file' file
- 'disconnect'
-
- exit 0
-